package com.imu.purse.api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.imu.common.annotation.IgnoreAuth;
import com.imu.common.utils.R;
import com.imu.purse.modules.base.service.SysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/api")
@Api(tags = "配置接口")
public class ApiConfigController 
{
    @Autowired
    private SysConfigService service;
    
    @IgnoreAuth
    @GetMapping("/config/{key}")
    @ApiOperation("获取配置信息")
    private R getNewVersion(@PathVariable("key") String key)
    {
        return R.ok(1).put("data", service.findByKey(key));
    }
}
